<html>
<head><meta charset="utf-8"><title>Contending diagnostics · t-compiler/help · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/index.html">t-compiler/help</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Contending.20diagnostics.html">Contending diagnostics</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="225396158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Contending%20diagnostics/near/225396158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hirochika Matsumoto <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Contending.20diagnostics.html#225396158">(Feb 06 2021 at 07:52)</a>:</h4>
<p>Working on <a href="https://github.com/rust-lang/rust/issues/81421">#81421</a> I added first help messages and now diagnostics look like:</p>
<div class="codehilite"><pre><span></span><code>error[E0277]: the trait bound `&amp;T: std::io::Read` is not satisfied
  --&gt; src/lib.rs:10:48
   |
10 |         let mut stream_reader = BufReader::new(&amp;stream);
   |                                                ^^^^^^^ the trait `std::io::Read` is not implemented for `&amp;T`
   |
   = note: required by `BufReader::&lt;R&gt;::new`
help: consider changing this borrow&#39;s mutability
   |
10 |         let mut stream_reader = BufReader::new(&amp;mut stream);
   |                                                ^^^^
help: consider removing the leading `&amp;`-reference
   |
10 |         let mut stream_reader = BufReader::new(stream);
   |                                               --
</code></pre></div>
<p>there two help messages are telling us different things on the same span.<br>
Are there similar cases where messages are conflicting one to another?<br>
<a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=237892c5941ebdc7356c13c2efee8b35">Playground</a></p>



<a name="225439523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Contending%20diagnostics/near/225439523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Noah Lev <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Contending.20diagnostics.html#225439523">(Feb 07 2021 at 01:31)</a>:</h4>
<p>IIUC, they're not conflicting, they're just offering different choices. That's fairly common with rustc diagnostics.</p>



<a name="225465535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/182449-t-compiler/help/topic/Contending%20diagnostics/near/225465535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Hirochika Matsumoto <a href="https://rust-lang.github.io/zulip_archive/stream/182449-t-compiler/help/topic/Contending.20diagnostics.html#225465535">(Feb 07 2021 at 14:06)</a>:</h4>
<p>Good to know that! Thanks <span aria-label="smiley cat" class="emoji emoji-1f63a" role="img" title="smiley cat">:smiley_cat:</span></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>